package com.tool.mysql.springMysql.controller;

import com.tool.mysql.springMysql.entity.User;
import com.tool.mysql.springMysql.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 酒徒
 * @Version 1.0
 * @data 2024/1/22 17:55
 */
@RestController
@RequestMapping("/admin")
@Slf4j
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public void getUser() {
        User user = userService.getUser();
        log.info("user:{}", user);
    }
}
